package com.baidu.java0317springboot.homework;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class House {

    @Qualifier("DeLi")
    @Resource
    private inter_condition conditioning;

    @Qualifier("HaiEr")
    @Resource
    private inter_television television;

    public void openDoor() {
        System.out.println("正在打开房门");
        conditioning.makeCold();
        television.open();
    }

    public inter_condition getConditioning() {
        return conditioning;
    }

    public void setConditioning(inter_condition conditioning) {
        this.conditioning = conditioning;
    }

    public inter_television getTelevision() {
        return television;
    }

    public void setTelevision(inter_television television) {
        this.television = television;
    }

    @Override
    public String toString() {
        return "House{" +
                "conditioning='" + conditioning + '\'' +
                ", television='" + television + '\'' +
                '}';
    }
}
